package timing.ukulele.gateway.client.callback;

import timing.ukulele.gateway.client.PortalClient;
import timing.ukulele.common.ResponseResult;
import timing.ukulele.common.portal.SystemData;
import timing.ukulele.common.portal.UserData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Slf4j
public class PortalClientCallback implements PortalClient {
    private final String tips = "系统服务调用失败";

    @Override
    public ResponseResult<UserData> findByUsername(String username) {
        log.error(tips);
        return ResponseResult.rpcError(tips);
    }

    @Override
    public ResponseResult<List<Long>> getSystemIdByUserId(Long userId) {
        log.error(tips);
        return ResponseResult.rpcError(tips);
    }

    @Override
    public ResponseResult<SystemData> getSystemById(String id) {
        log.error(tips);
        return ResponseResult.rpcError(tips);
    }
}
